package exceptionDemo;

import java.util.Scanner;

public class NoPointer {
	public static void main(String[] args) throws NoPointerException {
		Scanner  input = new Scanner(System.in);
		try{
			System.out.print("请输入你的成绩：");
			int score = input.nextInt();
			if(score >= 0 && score <= 100){
				System.out.println(score);
			}else{
				throw new NoPointerException("请正确输入 成绩信息");
			}
		}catch(NoPointerException e){
			e.printStackTrace();
		}	
	}
}
